﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI.MobileControls;
using System.Web.UI.WebControls;

namespace TMDT.Web.UI.Commons
{
    public static class DropDownListHelper
    {
        public static void LoadDataSource(this DropDownList ddl,object dataSource,string displayField,string valueField)
        {
            ddl.DataSource = dataSource;
            ddl.DataTextField = displayField;
            ddl.DataValueField = valueField;
            ddl.DataBind();
        }
    }
}